using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.Security;

public partial class contact : System.Web.UI.MasterPage
{
  protected void Page_Load(object sender, EventArgs e)
  {
      if (!IsPostBack)
      {
          MembershipUser user = Membership.GetUser();

          AdminLink.NavigateUrl = "/members/admin/default.aspx";
          if (!Page.User.IsInRole("SueetieAdministrator"))
          {
              AdminLI.Visible = false;
              AdminLink.Visible = false;
          }
          UserLink.Text = "Welcome, Guest!";
          UserLink.NavigateUrl = "/members/login.aspx";
          if (Page.User.Identity.IsAuthenticated)
          {
              UserLink.Text = "Welcome, " + user.UserName + "!";
              UserLink.NavigateUrl = "/members/myaccountinfo.aspx";
          }
          if (Page.User.Identity.IsAuthenticated)
              RegisterLI.Visible = false;

      }
  }

}
